package com.pktechan.api.service;

import com.pktechan.api.base.BaseService;
import com.pktechan.api.dto.CommissionDTO;
import com.pktechan.api.entity.CommissionGenerateFlow;
import com.pktechan.api.vo.CommissionGenerateFlowVo;

import java.util.List;

public interface CommissionGenerateFlowService extends BaseService<CommissionGenerateFlow> {
    /**
     * 佣金生成明细列表
     *
     * @param custId
     * @return
     */
    List<CommissionGenerateFlowVo> getCommissionGenerateDetailsListByCustId(Integer custId);


    /**
     * 根据订单ID与佣金代数生成佣金流水
     *
     * @param tradeOrderId
     * @param commissionGeneration
     */
    void saveCommissionGenerateFlowByTradeOrderId(Integer tradeOrderId, Integer commissionGeneration);

    /**
     * 根据订单ID查询一级推荐人佣金汇总
     *
     * @param tradeOrderId
     * @param commissionGeneration
     * @return
     */
    CommissionDTO getTotalCommissionByTradeOrderId(Integer tradeOrderId, Integer commissionGeneration);

    /**
     * 根据订单ID与佣金代数查询已生成的佣金流水
     *
     * @param tradeOrderId
     * @param code
     * @return
     */
    List<CommissionGenerateFlow> getCommissionGenerateFlowListByTradeOrderId(Integer tradeOrderId, Integer code);
}
